package tut.collection.code;

import java.util.Stack;

public class StackTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Stack stack = new Stack();
		stack.add("o");
		stack.add("tw");
		stack.add("t");
		stack.add("f");
		System.out.println(stack);

		System.out.println(stack.search("tw"));
		System.out.println(stack.search("aa"));

		System.out.println(stack.pop());
		System.out.println(stack);

		System.out.println(stack.push("5"));
		System.out.println(stack);

		System.out.println(stack.peek());
		System.out.println(stack);

		Stack stack2 = new Stack();

		stack2.push("1");
		stack2.push("2");
		stack2.push("3");

		int index = stack2.search("3");
		System.out.println(index);
	}
// =>pop,peek
	// search, result difference with insert order
}
